-- GENERATED SPELL FOR [Arcatraz Sentinel] --


function spell0_20869(pUnit, Event) --@Energy Discharge,Self--
pUnit:FullCastSpellOnTarget(36716,pUnit)
pUnit:RegisterEvent('Sorts_20869', 0, 1)
end

function spell1_20869(pUnit, Event) --@Explode,Self--
pUnit:FullCastSpellOnTarget(36719,pUnit)
pUnit:RegisterEvent('Sorts_20869', 7000, 1)
end

function spell2_20869(pUnit, Event) --@Explode,Self--
pUnit:FullCastSpellOnTarget(38830,pUnit)
pUnit:RegisterEvent('Sorts_20869', 7000, 1)
end

function Sorts_20869(pUnit, Event)
local choix_sorts_20869 = math.random(0, 2)
if choix_sorts_20869 == 0 then
pUnit:RegisterEvent('spell0_20869', 1, 1)
end
if choix_sorts_20869 == 1 then
pUnit:RegisterEvent('spell1_20869', 1, 1)
end
if choix_sorts_20869 == 2 then
pUnit:RegisterEvent('spell2_20869', 1, 1)
end
end

function mob20869_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20869', math.random(1500, 3000), 1)
end

function mob20869_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20869_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20869_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20869, 1, 'mob20869_Action')
RegisterUnitEvent(20869, 2, 'mob20869_Leave')
RegisterUnitEvent(20869, 3, 'mob20869_Kill')
RegisterUnitEvent(20869, 4, 'mob20869_Die')
